import 'package:json_annotation/json_annotation.dart';

part 'xmm_oss_policy.g.dart';

@JsonSerializable()
class XmmOssPolicy {
  String? accessKeyId; //访问身份验证中用到用户标识
  String? callback; //上传成功后的回调设置
  String? dir; //上传文件夹路径前级
  String? expire; //过期时间
  String? host; //oss对外服务的访问域名
  String? policy; //用户表单上传的策路，经过base64编码过的宇符串
  String? signature; //对policy签名后的字符串

  XmmOssPolicy(
    this.accessKeyId,
    this.callback,
    this.dir,
    this.expire,
    this.host,
    this.policy,
    this.signature,
  );

  factory XmmOssPolicy.fromJson(Map<String, dynamic> json) => _$XmmOssPolicyFromJson(json);

  Map<String, dynamic> toJson() => _$XmmOssPolicyToJson(this);
}
